//
//  OrderRecordTableViewCell.m
//  KuWoCan
//
//  Created by 周小宏 on 2017/4/28.
//  Copyright © 2017年 hwd. All rights reserved.
//

#import "OrderRecordTableViewCell.h"
#import "OrderDetailCheckModel.h"

@implementation OrderRecordTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        self.selectionStyle = UITableViewCellSelectionStyleNone;
        self.backgroundColor = [UIColor whiteColor];
    }
    return self;
}

- (void)configCell:(OrderDetailCheckModel *)model {
    for (UIView *view in self.contentView.subviews) {
        [view removeFromSuperview];
    }

//    for (OrderDetailCheckModel *model in arr) {
        UILabel *messageLabel = [[UILabel alloc] init];
        messageLabel.textColor = [UIColor colorWithHexString:@"#757575"];
        messageLabel.font = KwFont(14 * screenW_6);
        messageLabel.text = [NSString stringWithFormat:@"%@，%@，%@", model.user.name, model.approverTime, model.approverMemo];
        [self.contentView addSubview:messageLabel];

        [messageLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(@(10 * screenW_6));
            make.left.equalTo(@(20 * screenW_6));
            make.right.equalTo(@(15 * screenW_6));
            make.bottom.equalTo(@(-15 * screenW_6));
        }];
//    }

}

- (void)configProductRecordCell:(OrderDetailCheckModel *)model {
    for (UIView *view in self.contentView.subviews) {
        [view removeFromSuperview];
    }

    //    for (OrderDetailCheckModel *model in arr) {
    UILabel *messageLabel = [[UILabel alloc] init];
    messageLabel.textColor = [UIColor colorWithHexString:@"#757575"];
    messageLabel.font = KwFont(14 * screenW_6);
    messageLabel.text = [NSString stringWithFormat:@"%@，%@，%@", model.user.name, model.approvalTime, model.approvalMemo];
    [self.contentView addSubview:messageLabel];

    [messageLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(@(10 * screenW_6));
        make.left.equalTo(@(20 * screenW_6));
        make.right.equalTo(@(15 * screenW_6));
        make.bottom.equalTo(@(-15 * screenW_6));
    }];
    //    }

}




@end
